<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:sec="http://www.springframework.org/security/facelets/tags"> 
<ui:composition>
	<sec:ifAnyGranted roles="ROLE_USUARIO, ROLE_ADMINISTRADOR">
		<h:form id="menu">
			<table width="100%">
			<tr>
				<td>					
					<h:commandButton value="Visitas" action="/restrito/lancamento"/>
					<h:commandButton value="Companheiro" action="/restrito/cheque" />
					<h:commandButton value="Metas" action="/restrito/acao" />
					<sec:ifAnyGranted roles="ROLE_ADMINISTRADOR">
						<h:commandButton value="Cadastrar Famílias" action="/admin/cadastro-familia"/>
						<h:commandButton value="Mestres Familiares" action="#{mestreBean.novo}"/>
					</sec:ifAnyGranted>
				</td>
				<td align="left">
					<sec:ifAnyGranted roles="ROLE_ADMINISTRADOR">
						<h:commandLink action="/admin/principal" title="Administrativo">
							<h:graphicImage library="imagens" name="administrativo16.png" />
						</h:commandLink>
					</sec:ifAnyGranted>
					<h:commandLink action="/restrito/principal" title="Principal">
						<h:graphicImage library="imagens" name="principal16.png" />
					</h:commandLink>
					<h:outputLink value="javascript:void(0)" onclick="document.location='#{request.contextPath}/j_spring_security_logout'" title="Sair">
						<h:graphicImage library="imagens" name="logout16.png" />
					</h:outputLink>
				</td>
			</tr>
			</table>
		</h:form>
	</sec:ifAnyGranted>
</ui:composition> 
</html>
